package cheme.ProcessEditor.Table;

import org.eclipse.draw2d.IFigure;

public class TableHeaderDecoration <T extends IFigure> extends SubTableFig
{
	TableRowFig header = null;
	T content = null;
	
	public static final int HEADER_INDEX = 0;
	public static final int OVERLL_INDEX = 1;
	
	public TableHeaderDecoration()
	{		
		super();
	}
	
	public void setHeader(TableRowFig header)
	{
		if(null != getHeader())
		{
			remove(getHeader());
		}
		
		this.header = header;
		add(this.header, HEADER_INDEX);
	}
	
	public TableRowFig getHeader()
	{
		return header;
	}
	
	public void setContentPane(T content)
	{
		if(null != getContentPane())
		{
			remove(getContentPane());
		}
		
		this.content = content;
		add(this.content, OVERLL_INDEX);
	}
	
	public T getContentPane()
	{
		return content;
	}
}
